Skip to content

Conversation

github-actions[bot]
Copy link
Contributor

@github-actions github-actions bot commented Aug 19, 2025

Backport of #118832 to release/10.0

/cc @MichalStrehovsky

Customer Impact

  • Customer reported
  • Found internally

We're significantly improving publish AOT size for small apps in 10.0. Linux didn't see the same size savings due to the issue fixed here.

Regression

  • Yes
  • No

Testing

rt-sz size tests, outerloop run.

Risk

The risk is low, calls to this method get expanded by RyuJIT and the body is generally not looked at. Instead of doing work and then throwing an exception, we skip the work and throw exception directly.

IMPORTANT: If this backport is for a servicing release, please verify that:

  • The PR target branch is release/X.0-staging, not release/X.0.

Package authoring no longer needed in .NET 9

IMPORTANT: Starting with .NET 9, you no longer need to edit a NuGet package's csproj to enable building and bump the version.
Keep in mind that we still need package authoring in .NET 8 and older versions.

This seems to be at least one of the reasons why Hello World on Linux still needs support for boxed enums. `CreateSpan` is used with an enum type in Unix System.Console, which brings a boxed enum into whole program view and we can't undo the damage this causes to the whole program view during compilation anymore (even though we no longer need the `typeof` then because RyuJIT always expands `CreateSpan`).
Copy link
Member

@jeffschwMSFT jeffschwMSFT left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

approved. please get a code review. we can merge when ready

@jeffschwMSFT jeffschwMSFT added the Servicing-approved Approved for servicing release label Aug 26, 2025
@jeffschwMSFT jeffschwMSFT added this to the 10.0.0 milestone Aug 26, 2025
@MichalStrehovsky
Copy link
Member

@dotnet/ilc-contrib could someone have a look please?

@jeffschwMSFT jeffschwMSFT merged commit 4cf369e into release/10.0 Aug 26, 2025
146 of 147 checks passed
@MichalStrehovsky MichalStrehovsky deleted the backport/pr-118832-to-release/10.0 branch August 26, 2025 21:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Servicing-approved Approved for servicing release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants